<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>角色权限分配</title>
    <script type="text/javascript" src="/static/js/jquery.js"></script>
    <script type="text/javascript" src="/static/js/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript">
        function SubForm() {  //定义表单提交的方法
            $("#setForm").submit();
        }

        function AfterSet(data) {
            window.parent.ParentAfterSet(data);
        }
    </script>

</head>
<body>
为角色 <span style="font-size:14px;color:red;font-weight: bolder">{{.roleInfo.RoleName}}</span>分配权限
<form data-ajax="true" data-ajax-method="post" data-ajax-success="AfterSet"
      data-ajax-url="/Admin/RoleInfo/SetRoleAction" id="setForm">
    <input type="hidden" value="{{.roleInfo.Id}}" name="roleId">
{{range .allActions}}
    {{if checkRoleAction $.roleExtActions .Id}}
        <div><input type="checkbox" checked="checked" name="cba_{{.Id}}">{{.ActionInfoName}}</div>
    {{else}}
    <div><input type="checkbox" name="cba_{{.Id}}">{{.ActionInfoName}}</div>
    {{end}}
{{end}}
</form>
</body>
</html>